#ifndef DB_HELPER_H
#define DB_HELPER_H

#include "QuantumSipServerNotifications.h"


/*
 * Database string define
 */
#define TABLE_DIALOG_RECORDS    "dialog_records"
#define TABLE_DIALOG            "dialog"
#define TABLE_MISSED_CALLS      "missed_calls"

#define COLUMN_HASH_ENTRY       "hash_entry"
#define COLUMN_HASH_ID          "hash_id"

#define COLUMN_CALL_ID          "callId"
#define COLUMN_CALLER_ID        "callerId"
#define COLUMN_CALLER_PROXY_ID  "callerProxyId"
#define COLUMN_CALLEE_ID        "calleeId"
#define COLUMN_CALLEE_PROXY_ID  "calleeProxyId"
#define COLUMN_CALL_TYPE        "callType"
#define COLUMN_CALL_STATE       "callState"

#define COLUMN_START_TIME       "startTime"
#define COLUMN_END_TIME         "endTime"

#define COLUMN_SIP_CODE         "sip_code"

#define SNMPSTATS_DIALOGS_COLUMN_COUNT  9


void CurrentDialogTable_db_add(CurrentDialogTable_context_str *context);

int CurrentDialogTable_db_get(CurrentDialogTable_context_str *context);

int CurrentDialogTable_db_get_dialog_list(char ***results);

char dialog_db_get_failure_type(const char *callId);

#endif /** DB_HELPER_H */
